﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WpfStarterKit.Framework.ViewModel;
using WpfStarterKit.Framework.Navigation;
using System.Windows.Input;
using WpfStarterKit.Framework.Commands;

namespace WpfStarterKit.SampleApplication.Screens.PassingDataInterface.DataPage1
{
    public class DataPage1ViewModel : UserInterfaceViewModel, IProvideData
    {
        public DataPage1ViewModel()
        {
            HomeCommand = new NavigationCommand(NavigationActions.Start);
            Page2Command = new NavigationCommand(NavigationActions.DataPage2);
        }

        public virtual ICommand HomeCommand { get; set; }
        public virtual ICommand Page2Command { get; set; }
        public virtual string Data { get; set; }

        #region IProvideData Members

        public object ProvideData(string requestor)
        {
            if(requestor == NavigationActions.DataPage2)
            {
                return Data;
            }

            return null;
        }

        #endregion
    }
}
